def substring_before(string, sep):
    found = string.find(sep)
    return '' if found == -1 else string[:found]

def substring_after(string, sep):
    found = string.find(sep)
    return '' if found == -1 else string[found + len(sep):]
